package com.dao.impl;

import com.dao.ArticleInfoDao;
import com.domain.Article_info;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class ArticleInfoDaoImpl implements ArticleInfoDao {

    @Autowired
    private JdbcTemplate jdbcTemplate;


    public void save(Article_info articleInfo) {
        String sql = "insert into article_info values (null,?,?,?,?)";
        jdbcTemplate.update(sql,articleInfo.getTitle(),articleInfo.getAuthor(),articleInfo.getKeyword(),articleInfo.getLength());
    }
}
